home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
parallel
/
readme
< prev
next >
Wrap
Text File
|
1992-04-11
|
3KB
|
64 lines
PROLOG-1-LINDA and PROLOG-N-LINDA
This directory contains the source for Prolog-1-Linda (the mono-processor
implementation) and Prolog-N-Linda (the multi-processor implementation.
To use Prolog-1-Linda, you need :
server - Tuple space server Prolog source code
client - Client Prolog source code
Prolog-1-Linda has not been developed as much as Prolog-N-Linda, but
should still work. It can be run under muProlog with no modifications.
To use Prolog-1-Linda (i) run muProlog and consult server, (ii) evaluate
go(<Goal>,<File>)., where <Goal> is the goal to evaluate on the client
after it consults <File>. Watch out for procedure name clashes between
any of your programs and the server/client source. There is one sample
program for Prolog-1-Linda, philosophers_1. A simple way to test the
system is to evaluate ?-go(break,dummy)., which will cause the client
to break into a command loop, from which you can interactively
manipulate the tuple space (dummy is some dummy Prolog source file).
To use Prolog-N-Linda, you need :
communicator.c - The communicator source, written in C
descriptor.c - Change #1 for muProlog
execlp.c - Change #2 for muProlog
lindasrc - Server and client Prolog source code
mulinda - muProlog specific communications Prolog source code
The changes to muProlog are easy to make, and are documented in
descriptor.c and execlp.c. Rebuild muProlog appropriately. Compile
the communicator before you do anything else.
To run Prolog-N-Linda, (i) Edit lindasrc to make the client_list fact
reflect your machine names and load capacity. The machine names and
capacity are given as a list such as [bison(2),budgie(1),woylie(3)].
This means that bison can run 2 clients, budgie 1 and woylie 3.
(ii) consult lindasrc & mulinda, (iii) evaluate ?-make_linda. (This will
appear to do nothing, but actually creates a file linda, which is
needed.) Abort make_linda after a suitable pause. (iii) rerun muProlog,
consult lindasrc & mulinda, and evaluate ?-make_mugo(<Server machine name>).,
where <Machine_availability> is You will then be prompted for the initial
client information. In future runs you can now simply run muProlog with
the argument mugo. You will immediately be prompted for initial client
information. You can further modify lindasrc to make your programs
immediately runable - copy our geneticX examples.
There are several sample programs for Prolog-N-Linda :
interact - Interactive Linda. As client do not have a stdin or
stdout, the simple command loop interaction that can
be used in Prolog-1-Linda is not possible. This program
asks the server to do the io, and requires serverlib to
be loaded for this purpose.
maplist - Parallel function evaluation
fibonacci - Used with maplist as a "hard" function
philosophers - Dining philosophers
pingpong - Pingpong for timing uses
serverlib - Remote reading procedure, to be loaded with server
Any bugs, problems, fixes should be mailed to geoff@cs.uwa.edu.au
Geoff Sutcliffe.